package com.wc.alorithm_luogu.P2241;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/5/14 11:41
 * @description https://www.luogu.com.cn/problem/P2241
 * 统计方形（数据加强版）
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long n = sc.nextLong();
        long m = sc.nextLong();


        // 统计正方形的数量
        long squareNumberNumber = 0;
        // 统计长方形的数量
        long rectangleNumber = 0;
        // 当前数量
        long currentNumber;

        for (int length = 1; length <= n; length++) {
            for (int width = 1; width <= m; width++) {
                currentNumber = (n - length + 1) * (m - width + 1);
                if (length == width) {
                    squareNumberNumber += currentNumber;
                } else {
                    rectangleNumber += currentNumber;
                }
            }
        }


        System.out.println(squareNumberNumber + " " + rectangleNumber);
    }
}
